def count(n):
    s = 0
    m = n
    while (n != 1):
        if n % 2 == 0:
            n = n / 2
        else:
            n = n * 3 + 1
        s += 1
    print("{}经过{}次运算变为1".format(m, s))


count(int(input("请输入：")))
